<!--_meta 作为公共模版分离出去-->
<!DOCTYPE HTML>
<html>
<head>
    <meta charset="utf-8">
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
    <meta http-equiv="Cache-Control" content="no-siteapp" />
    <link rel="Bookmark" href="__EXTEND__/favicon.ico" >
    <link rel="Shortcut Icon" href="__EXTEND__/favicon.ico" />
    <!--[if lt IE 9]>
    <script type="text/javascript" src="__EXTEND__/lib/html5shiv.js"></script>
    <script type="text/javascript" src="__EXTEND__/lib/respond.min.js"></script>
    <![endif]-->
    <link rel="stylesheet" type="text/css" href="__EXTEND__/static/h-ui/css/H-ui.min.css" />
    <link rel="stylesheet" type="text/css" href="__EXTEND__/static/h-ui.admin/css/H-ui.admin.css" />
    <link rel="stylesheet" type="text/css" href="__EXTEND__/lib/Hui-iconfont/1.0.8/iconfont.css" />
    <link rel="stylesheet" type="text/css" href="__EXTEND__/static/h-ui.admin/skin/default/skin.css" id="skin" />
    <link rel="stylesheet" type="text/css" href="__EXTEND__/static/h-ui.admin/css/style.css" />
    <!--[if IE 6]>
    <script type="text/javascript" src="__EXTEND__/lib/DD_belatedPNG_0.0.8a-min.js" ></script>
    <script>DD_belatedPNG.fix('*');</script>
    <![endif]-->
    <!--/meta 作为公共模版分离出去-->


    <!--_footer 作为公共模版分离出去-->
    <script type="text/javascript" src="__EXTEND__/lib/jquery/1.9.1/jquery.min.js"></script>
    <script type="text/javascript" src="__EXTEND__/lib/layer/2.4/layer.js"></script>
    <script type="text/javascript" src="__EXTEND__/static/h-ui/js/H-ui.min.js"></script>
    <script type="text/javascript" src="__EXTEND__/static/h-ui.admin/js/H-ui.admin.js"></script>
    <!--/_footer /作为公共模版分离出去-->

    <!--请在下方写此页面业务相关的脚本-->
    <script type="text/javascript" src="__EXTEND__/lib/jquery.validation/1.14.0/jquery.validate.js"></script>
    <script type="text/javascript" src="__EXTEND__/lib/jquery.validation/1.14.0/validate-methods.js"></script>
    <script type="text/javascript" src="__EXTEND__/lib/jquery.validation/1.14.0/messages_zh.js"></script>
    <script type="text/javascript" src="__EXTEND__/lib/ueditor/1.4.3/ueditor.config.js"></script>
    <script type="text/javascript" src="__EXTEND__/lib/ueditor/1.4.3/ueditor.all.min.js"> </script>
    <script type="text/javascript" src="__EXTEND__/lib/ueditor/1.4.3/lang/zh-cn/zh-cn.js"></script>
    <title>操作</title>
</head>
<body>
<article class="page-container">
    <include file="Apply/layout" />
    <form class="form form-horizontal" id="form-edit" >
        <input type="hidden" name="id" value="{{$res['id']}}">
        <div class="row cl">
            <label class="form-label col-xs-2 col-sm-2">受理人：</label>
            <div class="formControls col-xs-9 col-sm-9">
                <label class="form-label l">{{:get_nickname($res['operator_1'])}}（{{:date("Y-m-d H:i:s",$res['accept_time'])}}）</label>
            </div>
        </div>
        <div class="row cl">
            <label class="form-label col-xs-2 col-sm-2">部门意见：</label>
            <div class="formControls col-xs-9 col-sm-9">
                <table class="table table-border table-bordered   table-hover ">
                    <thead>
                        <tr class="text-c">
                            <th width="">序号</th>
                            <th width="">部门</th>
                            <th width="">审批人</th>
                            <th width="50%">意见</th>
                            <th width="">审批时间</th>
                        </tr>
                    </thead>
                    <tbody>
                    <notempty name="opinions">
                        <foreach name="opinions" item="row" key="key">
                            <tr class="text-c">
                                <td>{{$key+1}}</td>
                                <td>{{$row["depart_name"]}}</td>
                                <td>{{$row["nickname"]}}</td>
                                <td >{{$row['opinion']}}</td>
                                <td>{{:date("Y-m-d H:i:s",$row["write_time"])}}</td>
                            </tr>
                        </foreach>
                        <else/>
                        <tr><td colspan="60" class="text-center">  暂时还没有内容! </td></tr>
                    </notempty>
                    </tbody>
                </table>
            </div>
        </div>
        <div class="row cl">
            <label class="form-label col-xs-2 col-sm-2">领导批注：</label>
            <div class="formControls col-xs-9 col-sm-9">
                <div class="pd-10">{{$res['leader_comment']}}</div>
            </div>
        </div>
        <if condition="$res['need_deliver'] eq 1">
        <div class="row cl">
            <label class="form-label col-xs-2 col-sm-2">快递单号：</label>
            <div class="formControls col-xs-9 col-sm-9">
                <input type="text" class="input-text" value="{{$res['deliver_tracking']}}" placeholder="请输入快递单号" id="deliver_tracking" name="deliver_tracking">
            </div>
        </div>
        </if>
        <div class="row cl">
            <label class="form-label col-xs-2 col-sm-2">审批汇总：</label>
            <div class="formControls col-xs-9 col-sm-9">>
                <!--<textarea id="collect_opinion" type="text" class="textarea" name="collect_opinion" placeholder="请填写审批汇总" >{{$res['collect_opinion']}}</textarea>-->
                <script id="editor" type="text/plain" style="width:100%;height:400px;"></script>
            </div>
        </div>
        <div class="row cl">
            <div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-2">
                <button class="btn btn-primary radius" type="submit"  ><i class="Hui-iconfont">&#xe6a7;</i> 确认</button>
                <button  class="btn btn-default radius" onclick="layer_close()">&nbsp;&nbsp;返回&nbsp;&nbsp;</button>
            </div>
        </div>
    </form>
</article>


<script type="text/javascript">
    $(function(){
        $('.skin-minimal input').iCheck({
            checkboxClass: 'icheckbox-blue',
            radioClass: 'iradio-blue',
            increaseArea: '20%'
        });
        $(".textarea").Huitextarealength({
            minlength:0,
            maxlength:255,
            errorClass:'error',
            exceed:true,
        });

        //表单验证
        $("#form-edit").validate({
            rules: {
            },
            onkeyup: false,
            focusCleanup: true,
            success: "valid",
            submitHandler: function (form) {
                $(form).ajaxSubmit({
                    type: 'post',
                    url: "{{:U('Admin/Apply/Apply4Edit')}}",
                    beforeSend:function(){
                    },
                    success: function (data) {
                        if (data.status) {
                            layer.msg(data.info, {icon: 6, time: 1000});
                            setTimeout((function () {
                                parent.window.location.href="{{:U('Admin/Apply/Apply4List',array('p'=>$p))}}";
                            }), 1500);
                        } else {
                            layer.msg(data.info, {icon: 2, time: 1000});
                        }
                    },
                    error: function (XmlHttpRequest, textStatus, errorThrown) {
                        layer.msg('error!', {icon: 5, time: 1000});
                    }
                });
            }
        });

        var ue = UE.getEditor('editor', {
            toolbars: [
                [ 'source', 'undo', 'redo','bold', 'italic', 'underline', 'fontborder', 'strikethrough', 'superscript', 'subscript', 'removeformat', 'formatmatch', 'autotypeset', 'blockquote', 'pasteplain', '|', 'forecolor', 'backcolor', 'insertorderedlist', 'insertunorderedlist', 'selectall', 'cleardoc','searchreplace','scrawl','template','background','tolowercase','touppercase','autotypeset',],
                ['backcolor','insertorderedlist','insertunorderedlist','fullscreen','directionalityltr','directionalityrtl','customstyle','insertparagraphbeforetable','insertcode','fontfamily','fontsize','paragraph','pagebreak','insertframe','imagenone','imageleft','imageright','attachment','justifyleft','justifyright','justifycenter','justifyjustify','forecolor',],
                ['simpleupload','insertimage','inserttable','charts','spechars','edittable','edittd', 'link','lineheight','imagecenter','attachment','rowspacingtop','rowspacingbottom',],
            ],

            autoHeightEnabled: true,
            autoFloatEnabled: false
        });
        var info = '{{:htmlspecialchars_decode($res["collect_opinion"])}}';

        ue.ready(function(){
            ue.setContent(info);
        })
    })

</script>
<!--/请在上方写此页面业务相关的脚本-->
</body>
</html>